home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 5
/
Amiga Tools 5.iso
/
tools
/
packer-tools
/
xpkatana
/
arexx
/
examine_kat.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-03-01
|
2KB
|
79 lines
/*************************************************************************
Examine_kat.rexx 0.2 (1.3.96) by Eric Sauvageau
Script for XPkatana - Will examine the specified file, returning
informations about it.
Specifying "?" as the source file will open a file requester, asking for
the source.
Usage: Examine_kat.rexx <filename>
**************************************************************************/
/*** We want ANSWERS!!! :) ***/
Options results
/*****
We need to get the shell's path, so XPKatana will be able to
locate the desired source file.
*****/
path = Pragma('D','')
If Right(path,1) ~= ':' Then path = path||'/'
/*** I wanna talk to ya :) ***/
Address 'KATANA'
/*** Retrieve the arguments from the command line ***/
Parse Arg source
If source = "" Then Do
Say "You must supply a source file, or use "?" for a file requester."
Exit 10
End
/*** Tell XPKatana what is the source file. ***/
SETSOURCE source ; found = result
/*****
If XPKatana can't find it, then try again, but adding the
current process's full path.
*****/
IF (found = 'NOFILE') & (source ~= '?') Then SETSOURCE path||source
/*** Examine it ***/
EXAMINE ; string = result
If string = "NOFILE" Then Do
Say "Cannot find specified file!"
Exit 10
End
If string = "ERROR" Then Do
Say "Error while examining file!"
Exit 10
End
/*** Parse the informations ***/
Parse Var string filename packer encrypted ratio description
/*** Now display the informations ***/
Say "Informations on" filename||""
Say ""
IF description ~= "" Then Say "Description: "||description
If packer ~= "#NONE" Then Do
Say "Packed with:" packer " - Efficiency:" ratio||"%"
If encrypted = "YES" Then Say "Encrypted."
End
Exit